<?php
/**
 * Enter description here ...
 * @author luiz
 *
 */
class Event {
	
	private $orientation = null;
	private $time = null;
	private $nodeID = null;
	private $protocol = null;
	private $agent = null;
	private $reason = null;
	private $eventID = null;
	private $timeToSendData = null;
	private $source = null;
	private $target = null;

	public function getOrientation(){
		return $this->orientation;
	}

	public function setOrientation($orientation){
		$this->orientation = $orientation;
	}

	public function getTime(){
		return $this->time;
	}

	public function setTime($time){
		$this->time = $time;
	}

	public function getNodeID(){
		return $this->nodeID;
	}

	public function setNodeID($nodeID){
		$this->nodeID = $nodeID;
	}

	public function getProtocol(){
		return $this->protocol;
	}

	public function setProtocol($protocol){
		$this->protocol = $protocol;
	}
	
	public function getAgent(){
		return $this->agent;
	}

	public function setAgent($agent){
		$this->agent = $agent;
	}
	
	public function getReason(){
		return $this->reason;
	}

	public function setReason($reason){
		$this->reason = $reason;
	}

	public function getEventID(){
		return $this->eventID;
	}

	public function setEventID($eventID){
		$this->eventID = $eventID;
	}
	
	public function getTimeToSendData(){
		return $this->timeToSendData;
	}

	public function setTimeToSendData($timeToSendData){
		$this->timeToSendData = $timeToSendData;
	}

	public function getSource(){
		return $this->source;
	}

	public function setSource($source){
		$this->source = $source;
	}

	public function getTarget(){
		return $this->target;
	}

	public function setTarget($target){
		$this->target = $target;
	}

	public function toString() {

		return $this->orientation . " " .
			$this->time . " " .
			$this->nodeID . " " .
			$this->protocol . " " .
			$this->agent . " " .
			$this->reason . " " .
			$this->eventID . " " .
			$this->source . " " .
			$this->target;
	}
	
	public function isRec() {
	
		if ($this->getOrientation() == "r") return true;
		else return false;
	
	
	}
	
	public function isSend() {
	
		if ($this->getOrientation() == "s") return true;
		else return false;
	
	
	}
	
	public function isDrop() {
	
		if ($this->getOrientation() == "D") return true;
		else return false;
	
	
	}
	
	public function isNet() {
	
		if ($this->getProtocol() == "RTR") return true;
		else return false;
	
	
	}
	
	public function isMac() {
	
		if ($this->getProtocol() == "MAC") return true;
		else return false;
	
	}
	
	public function isAgt() {
	
		if ($this->getProtocol() == "AGT") return true;
		else return false;
	
	}

	public function isIfq() {

		if ($this->getProtocol() == "IFQ") return true;
		else return false;

	}

	public function isIfqDrop() {

		if ($this->isIfq() && $this->isDrop()) return true;
		else return false;

	}
	
	public function isAgtRec() {
	
		if ($this->isAgt() && $this->isRec()) return true;
		else return false;
	}

	
	public function isNetDrop() {
	
		if ($this->isNet() && $this->isDrop()) return true;
		else return false;
	}
	
	public function isNetSend() {
	
		if ($this->isNet() && $this->isSend()) return true;
		else return false;
	}
	
	public function isNetRec() {
	
		if ($this->isNet() && $this->isRec()) return true;
		else return false;
	}
	
	public function isMacSend() {
	
		if ($this->isMac() && $this->isSend()) return true;
		else return false;
	}

	public function isMacRec() {
	
		if ($this->isMac() && $this->isRec()) return true;
		else return false;
	}

    public function isMacDrop() {
	
		if ($this->isMac() && $this->isDrop()) return true;
		else return false;
	}


			
}

?>
